(1)
It's not reasonable to use the bean for time measurement without any methods.
The following code sample measures the time of the for-cycle in microseconds:
MAIN.C
void main(void)
{
unsigned char i, time;
float one_loop_us;
FC81_Reset(); /* reset the counter */
for( i=0; i<255; ++i ); /* for-cycle */
/* get measured time of whole for-cycle */
if( FC81_GetTimeUS( &time )==ERR_OK ) {
/* average time of one loop */
one_loop_us = time / 255.0;
}
}
For more about typical usage of the bean code please refer to the page Bean Code Typical Usage.